<?php

	/**
	 * @see Bike_Initial
	 */
	require_once 'Bike/Initial.php';
	
	/**
	 * @see Bike_Controller_Router_Handler_Interface
	 */
	require_once 'Bike/Controller/Router/Handler/Interface.php';
	
	
	abstract class Bike_Controller_Router_Handler_Abstract extends Bike_Initial implements Bike_Controller_Router_Handler_Interface
	{
		protected $_name;
		protected $_accessorDelimiter;

		public function getName()
		{
			return $this->_name;
		}

		public function setName($Name)
		{
			$this->_name = $Name;
			return $this;
		}

		public function getAccessorDelimiter()
		{
			return $this->_accessorDelimiter;
		}

		public function setAccessorDelimiter($AccessorDelimiter)
		{
			$this->_accessorDelimiter = $AccessorDelimiter;
			return $this;
		}

		public function getAccessorWithDelimiter($Accessor)
		{			if(substr($Accessor, 0, strlen($this->getAccessorDelimiter())) != $this->getAccessorDelimiter())
        	{
        		$Accessor = $this->getAccessorDelimiter().$Accessor;
        	}
        	return $Accessor;
		}

		public function getRouteParam()
		{			return array($this->getName() => $this->getValue());
		}

		public function __toString()
		{			return $this->getValue();
		}

		abstract public function getValue();
	}
